<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta http-equiv="Access-Control-Allow-Origin" content="*" />
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<title>昆山健康网</title>
		<link rel="stylesheet" type="text/css" href="public/css/index.css" />
		<style>
			body{
				background:#f9f9f9;
			}
		</style>
	</head>
	<body>
		<div id="example">
			<div class="index_header">
				<div class="index_header_search">
					<div class="ihs_s_box">
						<input v-model="search" type="text" placeholder="点击搜索" class="ihs_s_boxI">
						<i class="ihs_s_boxIcon" @click="Search">
							<img style="width: 100%;" src="public/images/icon/1_06.png">
						</i>
					</div>
					<a href="/xlzxapi/wx_uCenter" class="ihs_UC">
						<img src="./public/images/icon/1_03.png" style="width:100%;">
					</a>
				</div>
				<div style="width: 98%;margin:0.6rem auto 0;font-size: 0;">
					<img style="width: 100%;" src="public/images/icon/1_11.png">
				</div>
				<div class="ihs_gn_lists">
					<a v-for="(item,index) in gnList" :href="item.url" class="ihs_gn_list">
						<i class="ihsgnl_icon">
							<img style="width: 100%;" :src="item.icon">
						</i>
						<span>
							{{item.title}}
						</span>
					</a>
					<div style="clear: both;"></div>
				</div>

			</div>
			<div style="width: 100%;box-sizing: border-box;padding:0.6rem 1rem;">

				<div class="tzgg-bg">
					<div class="tzgg-logo-bg">
						<div class="tzgg-logo">通知公告
						</div>
					</div>
					<div class="tzgg-content" v-if="tzggLists.length>0">
						<a v-for="item of tzggLists" :key="item.id" :href="(item.nlink?item.nlink:'view/detail.html?title=通知公告&id='+item.Id)"
						 class="tzggList tzgg-list1">
							<div class="textOver1">
								{{item.FullHead}}
							</div>
							<span class="tzggTime">
								{{item.FabuDate}}
							</span>
						</a>
					</div>
					<a href="" class="tzgg-more">更多</a>
				</div>
				<a href="view/jkpt.html" style="display: block;width:100%;">
					<img src="public/images/icon/1_40.png" style="width:100%;">
				</a>
			</div>
			<!-- <div class="index_tzgg">
				<div style="height: 0.5rem;background:#e0e0e0;width:100%;"></div>
				<div class="tzgg_title">
					<span class="tzgg_titles" style="position: relative;">
						通知公告
						<i style="position: absolute;display: block;bottom: -0.3rem;height: 0.5rem;left: 3rem;"><img style="height: 100%;position: absolute;top: 0;right: 0;"
							 src="public/images/icon/1_49.png"></i>
					</span>
					<a href="" class="tzggMore">更多</a>
				</div>
				<div v-if="tzggLists.length==0" style="text-align: center;color: #6c6c6c;">
					暂无内容
				</div>
				<div class="tzggLists" v-if="tzggLists.length>0">
					<a v-for="item of tzggLists" :key="item.id" :href="(item.nlink?item.nlink:'view/detail.html?title=通知公告&id='+item.Id)"
					 class="tzggList textOver">
						{{item.FullHead}}
						<span class="tzggTime">
							{{item.FabuDate}}
						</span>
					</a>
				</div>
			</div> -->
			<div class="index_jkzx">
				<div class="index_jkzx_top">
					<div class="index_jkzx_top_icon">

					</div>
					<div class="index_jkzx_title">
						健康资讯
					</div>
				</div>
				<div class="index_jkzx_list">
					<a v-for="(item,index) in jkzxList" :href="item.url" class="index_jkzx_item">
						<img class="index_jkzx_img" :src="item.icon">
						<div class="index_jkzx_text">
							{{item.title}}
						</div>
					</a>
				</div>
			</div>
		</div>


		<script src="public/script/plug/jquery-3.3.1.min.js"></script>
		<script src="public/script/plug/vue.js"></script>
		<script type="text/javascript" src="public/script/plug/layer/layer.js"></script>
		<script type="text/javascript" src="public/script/plug/common.js"></script>
		<script>
			var data = {
				gnList: [{
						url: 'view/zxList.html?title=卫生要闻',
						icon: 'public/images/icon/1_30.png',
						title: '卫生要闻'
					},
					{
						url: 'view/zxList.html?title=健康活动',
						icon: 'public/images/icon/jiankanghuodong.png',
						title: '健康活动'
					},
					{
						url: 'view/zxList.html?title=疫情防控',
						icon: 'public/images/icon/yiqingfangkong.png',
						title: '疫情防控'
					},
					{
						url: 'view/zxList.html?title=健康科普',
						icon: 'public/images/icon/jiankangkepu.png',
						title: '健康科普'
					},
					{
						url: 'view/zxList.html?title=党员主题教育',
						icon: 'public/images/icon/dangyuanzhutijiaoyu.png',
						title: '党员主题教育'
					},
					{
						url: 'view/zxList.html?title=在线视频',
						icon: 'public/images/icon/zaixianshipin.png',
						title: '在线视频'
					},
					{
						url: 'view/zxList.html?title=资料下载',
						icon: 'public/images/icon/ziliaoxiazai.png',
						title: '资料下载'
					},
					{
						url: 'view/zxList.html?title=用户中心',
						icon: 'public/images/icon/yonghuzhongxin.png',
						title: '用户中心'
					}
				],
				jkzxList: [{
						url: 'view/zxList.html?title=核酸检测一览表',
						icon: 'public/images/icon/hsjcylb.png',
						title: '核酸检测一览表'
					},
					{
						url: 'view/zxList.html?title=儿科候诊信息查询',
						icon: 'public/images/icon/ekhzxxcx.png',
						title: '儿科候诊信息查询'
					},
					{
						url: 'view/zxList.html?title=健康教育处方查询',
						icon: 'public/images/icon/jkjycfcx.png',
						title: '健康教育处方查询'
					},
					{
						url: 'view/zxList.html?title=建党100周年',
						icon: 'public/images/icon/jd100zn.png',
						title: '建党100周年'
					}
				],
				tzggLists: [],
				search: '',
			};
			var vm = new Vue({
				el: '#example',
				data: data,
				mounted() {
					let that = this;
					$.ajax({
						url: apiUrl() + '/home/tongzhigonggao',
						type: 'post',
						success: function(d) {
							if (d.listgonggao) {
								let lists = d.listgonggao;
								for (var i = 0; i < 2; i++) {
									if (lists[i].FabuDate) {
										lists[i].FabuDate = formatDate(lists[i].FabuDate, 'yyyy-MM-dd');
									}
									that.tzggLists.push(lists[i])
								}
								// for (let i in lists) {
								// 	if (lists[i].FabuDate) {
								// 		lists[i].FabuDate = formatDate(lists[i].FabuDate, 'yyyy-MM-dd');
								// 	}
								// }
								// that.tzggLists = lists;
							}
						}
					})
				},
				methods: {
					Search: function() {
						if (!this.search) {
							layer.msg('请输入您需要搜索的内容');
						} else {
							window.location.href = 'view/search.html?keyword=' + this.search;
							//执行搜索
						}

					}
				}
			});
		</script>
	</body>
</html>
